﻿Imports DTO
Imports DAO
Public Class ChiTiet_PKBBUS
    Public Function INSERT(ByVal _maphieu As Long, ByVal _mathuoc As Long, ByVal _madonvi As Long, ByVal _soluong As Long, ByVal _cachdung As Long, ByVal _mabenh As Long) As Integer
        Dim ctpkb As New ChiTiet_PKBDTO()
        Dim ctpkb_DAO As New ChiTiet_PKBDAO()
        Try
            ctpkb.MaPhieu = _maphieu
            ctpkb.MaThuoc = _mathuoc
            ctpkb.MaDonVi = _madonvi
            ctpkb.SoLuong = _soluong
            ctpkb.MACACHDUNG = _cachdung
            ctpkb.MABENH = _mabenh
        Catch ex As Exception
            Return 2
        End Try
        Dim kq As Integer
        kq = ctpkb_DAO.INSERT(ctpkb)
        Return kq
    End Function
End Class
